<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加商品</title>
    <link rel="stylesheet" type="text/css" href="../../layui/css/layui.css">
    <link rel="stylesheet" type="text/css" href="../../css/product/productadd.css">
</head>
<body>

<form class="layui-form" action="">
<div>
    <div class="d1">
        <input id="title1" type="text" name="categroyId" required lay-verify="required" placeholder="请选择商品分类" autocomplete="off"  class="layui-input">
    </div>
    <div class="d1">
        商品分类：<input id="title" type="text" required lay-verify="required" placeholder="请选择商品分类" autocomplete="off"  class="layui-input">
    </div>
    <button id="b1" type="submit" class="submit_button layui-btn layui-btn-primary layui-icon layui-icon-layer" onclick="tree();return false;"></button>
    <div class="d1">
        商品编号：<input type="text" name="productCode" required lay-verify="required" placeholder="输入商品编号" autocomplete="off" class="layui-input">
    </div>
    <div class="d1">
        商品名称：<input type="text" name="productName" required lay-verify="required" placeholder="输入商品名称" autocomplete="off" class="layui-input">
    </div >
    <div class="d1">
        商品状态：<input type="radio" name="state" value="0" title="上架">
                <input type="radio" name="state" value="1" title="下架"checked>
    </div>
    <div class="d1">
        商品价格：<input type="text" name="currentpriceProduct" required lay-verify="required" placeholder="输入商品价格" autocomplete="off" class="layui-input">
    </div>
    <div class="d1">
        商品标签：<input type="text" name="productLabel" required lay-verify="required" placeholder="输入商品标签" autocomplete="off" class="layui-input">
    </div>
    <div class="d1">
        关键字：<input type="text" name="searchKeywords" required lay-verify="required" placeholder="输入搜索关键字" autocomplete="off" class="layui-input">
    </div>

    <div class="d2">
    <div class="layui-input-block">
        新品推荐：<input type="radio" name="recommend" value="2" title="新品">
                <input type="radio" name="recommend" value="3" title="推荐"checked>
    </div>

    <div class="layui-input-block">
        优惠卷：<input type="radio" name="discount" value="2" title="可用"checked>
              <input type="radio" name="discount" value="3" title="不可用">
    </div>

    <div class="layui-input-block">
        服务保障：<input type="radio" name="ensure" value="2" title="无忧退货">
                <input type="radio" name="ensure" value="3" title="快速退款" >
                <input type="radio" name="ensure" value="4" title="免费包邮" checked>
    </div>
</div>
    <div>
        <div class="layui-input-block">
            <input type="hidden" name="mainImage" value="" class="image">
            <button type="button" class="layui-btn" id="test1" lay-url="">上传图片</button>
        </div>
    </div>

    <div id="yuzhantu">
        <div id="mainImage" name="mainImage">预展图：<img class="layui-upload-img" id="demo1" width="150px" height="150px"></div>
    </div>
    <input hidden value="" name="mainImage" class="image">
</div>

    <div id="d3" class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="addNodeform">确定</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>

</form>

<div id="tree" style="display: none">

    <form class="layui-form" action="javascript:;" lay-filter="jojo">
        <div id="ptree"></div>

        <button class="layui-btn" id="queding" lay-submit lay-filter="Yes">确定</button>
        <button type="reset" class="layui-btn layui-btn-primary">重置</button>

    </form>
</div>

<script src="../../layui/layui.js"></script>
<script src="../../js/jquery-3.6.0.js"></script>
<script src="../../js/product/productadd.js"></script>

</body>
</html>